Repository navigation
Release a beta skipped for the gap within minutes of the gap ending - #982
Merged
Merged
Conversation
A beta skipped for the gap waited for beta-follow-up.yml's schedule, which GitHub can start hours late. The run that skips it now starts a waiter (beta-follow-up.yml with its skip record) that sleeps in its own run until the gap ends, then starts mode beta-after-deploy again. It re-checks that the commit is still unreleased, checks again every two minutes while a run of auto-release.yml is queued or running, and hands over to a new waiter when its minutes run out. A newer skip's waiter replaces it. The schedule stays as the backstop, in its own concurrency group.
Contributor
|
🟡 Post-merge health check: deploy cancelled: the deploy for
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A beta skipped for the gap between betas now goes out within a few minutes of the gap ending, with no dependence on GitHub's schedule. Until now it waited for the 30-minute schedule in
beta-follow-up.yml, which GitHub can start hours late, so merged and deployed work could sit past the end of the gap with no beta.The run of
auto-release.ymlthat skips a beta for the gap now starts a waiter:beta-follow-up.ymldispatched with that run's skip record. The waiter sleeps in its own run until the gap ends, checks, and startsauto-release.ymlin modebeta-after-deploy, the same run a deploy starts. It sleeps in its own run, not inauto-release.yml, so theauto-releaseconcurrency group is never held, and a queued promotion or stable release is never replaced. The schedule stays as a backstop.Changes
.github/scripts/auto_release.pyplanalso writes the skip record as thedue_recordoutput.follow_upreturnswait: the seconds after which checking again may change its answer. That is the time left until the record is due, orPOLL_SECONDS(two minutes) while a run ofauto-release.ymlis queued or running. It isNonewhen the answer is final.follow_upnow asks whether a run is busy only when that matters.wait_for_due: it repeats the check for at most--wait-minutes. When those minutes run out before a final answer, it writesagain=true..github/workflows/auto-release.yml: new jobwait(actions: write, 5-minute limit) afterplan. When the plan skipped for the gap, it dispatchesbeta-follow-up.ymlwithrecord. Thebeta-dueartifact stays, for the backstop..github/workflows/beta-follow-up.ymlrecordinput. With a record, theduejob waits for up to 330 minutes: past the 4-hour gap and its margin, and under the 6-hour job limit (timeout 350).againstarts a new waiter with the same record when the time runs out, for example while a long release run is still going.beta-follow-up-wait, so a newer skip's waiter replaces the older one. The schedule and dispatches without a record usebeta-follow-up, so the backstop never cancels a waiter.docs/self-host/updates-security.md: the release chain section describes the waiter, with the schedule as the backstop.No new way to cut a beta: the waiter only starts the same
beta-after-deployrun. That run still checks that main's head was deployed, that CI passed on it, and that the gap has ended. It skips a commit that is already released, so the waiter can never cut a second beta within the gap or a duplicate beta. Dispatching either workflow by hand works as before.Verification
python3 -m unittest discover -s .github/scripts -p 'test_*.py': 229 tests pass. New tests cover:due_recordoutput;waitvalues;follow-up --wait-minutescommand;BETA_GAP_HOURSinside the job limit.python3 .github/scripts/check_workflows.py: 11 workflows clean.python3 .github/scripts/brand_spelling.py: clean.actionlinton both changed workflows: clean.